package com.xhj.bigfactory.bigFactory.GC_JVM;
/**
 * -
 *
 * @author 周沫 @Date 2021-08-01 @Time 13:42
 */
public class T {
  public static void main(String[] args) {
    Integer[] integers = new Integer[1024 * 1024];
    System.out.println("integers = " + integers);
    System.out.println("Hello GC ....................");
    System.gc();
    System.out.println("integers = " + integers);
    System.out.println("=========================================================");
    System.out.println("=========================================================");

    System.out.println(
        "Runtime.getRuntime().totalMemory() = " + Runtime.getRuntime().totalMemory() / 1024 / 1024);
    System.out.println(
        "Runtime.getRuntime().maxMemory()/1024/1024 = "
            + Runtime.getRuntime().maxMemory() / 1024 / 1024);
    while (true) {}
  }
}
